<html xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui" xmlns:ui="http://java.sun.com/jsf/facelets">

<ui:composition template="/layouts/default.xhtml">
    <ui:define name="title">#{text['personDetail.title']}</ui:define>
    <ui:param name="menu" value="PersonMenu"/>

    <ui:define name="body">
        <script type="text/javascript">var msgDelConfirm =
           "<h:outputFormat value="#{text['delete.confirm']}"><f:param value="person"/></h:outputFormat>";
        </script>

        <div class="col-sm-3">
            <h2>#{text['personDetail.heading']}</h2>
        </div>

        <div class="col-sm-7">
<h:form id="personForm" styleClass="well">
    <div class="form-group">
        <h:inputHidden value="#{personForm.person.id}" id="id"/>
    </div>

    <div class="form-group">
        <h:outputLabel styleClass="control-label" for="firstName" value="#{text['person.firstName']}"/>
        <h:inputText id="firstName" value="#{personForm.person.firstName}" styleClass="form-control"
                     required="true" maxlength="50"/>
        <p:message for="firstName"/>
    </div>
    <div class="form-group">
        <h:outputLabel styleClass="control-label" for="lastName" value="#{text['person.lastName']}"/>
        <h:inputText id="lastName" value="#{personForm.person.lastName}" styleClass="form-control"
                     required="true" maxlength="50"/>
        <p:message for="lastName"/>
    </div>
    <div class="form-group form-actions">
        <h:commandButton value="#{text['button.save']}" action="#{personForm.save}"
                         id="save" styleClass="btn btn-primary"/>
        <h:commandButton value="#{text['button.delete']}" action="#{personForm.delete}"
                         id="delete" styleClass="btn btn-default"
                         onclick="return confirmMessage(msgDelConfirm)"/>
        <h:commandButton value="#{text['button.cancel']}" action="cancel" immediate="true"
                         id="cancel" styleClass="btn btn-default"/>
    </div>
</h:form>
        </div>
    </ui:define>
</ui:composition>
</html><!---->